<template>
  <div class="set">
    <div class="commons_top">
      <div class="commons_back" @click="$router.go(-1)">
        <img src="@/assets/index/back.png" />
      </div>
      <span class="commons_title">我的设置</span>
    </div>
    <div class="set_box">
      <div class="set_olis" @click="linkTo('password')">
        <span class="set_title">修改密码</span>
        <img src="@/assets/my/arrow.png" class="set_icon">
      </div>
      <div class="set_olis" @click="linkTo('introduction')">
        <span class="set_title">关于我们</span>
        <img src="@/assets/my/arrow.png" class="set_icon">
      </div>
    </div>
    <div class="set_exit" @click="logOut">退出登录</div>
  </div>
</template>

<script>
import '@static/css/common.css'
import { Toast } from 'mint-ui';
import { loginOutAPI } from '@/api/person'

export default {
  data() {
    return {
      
    }
  },
  methods: {
    linkTo(name) {
      this.navigationFuc(name)
    },
    logOut() { //退出登录
      loginOutAPI().then(res => {
        if (res.data.code == 0) {
          Toast('退出登录成功')
          localStorage.clear();
          this.navigationFuc('sign')
        } else {
          Toast(res.data.msg)
        }
      })
    }
  },
}
</script>

<style scoped>
  .set {
    width: 100%;
    height: 100vh;
    background: #F8F8F8;
  }
  .set .commons_top {
    background: #ffffff;
  }
  .set_box {
    width: 100%;
    padding-top: 0.09rem;
    background: #F8F8F8;
  }
  .set_olis {
    padding: 0.36rem 0.3rem 0.35rem;
    box-sizing: border-box;
    border-bottom: 0.02rem solid #eeeeee;
    background: #ffffff;
  }
  .set_olis {
    overflow: hidden;
  }
  .set_title {
    color: #333333;
    font-size: 15px;
    font-weight: 500;
  }
  .set_icon {
    width: 0.14rem;
    height: 0.24rem;
    vertical-align: middle;
    float: right;
  }
  .set_exit {
    position: fixed;
    height: 0.8rem;
    width: 6.9rem;
    text-align: center;
    line-height: 0.8rem;
    margin: 0 auto;
    background: #E5E5E5;
    color: #333333;
    font-size: 15px;
    font-weight: bold;
    border-radius: 0.09rem;
    bottom: 0.38rem;
    left: 0.3rem;
  }
</style>